import com.spire.xls.*;

public class ExcelToPDF {
    public static void main(String[] args) {
        //加载Excel文档
        Workbook wb = new Workbook();
        wb.loadFromFile("C:\\Users\\admin\\Desktop\\XL_2F24262B7837419D9BB9632C9BE7446B.xlsx");

        //调用方法保存为PDF格式
        wb.saveToFile("ToPDF.pdf", FileFormat.PDF);
    }
}